<%# coding: UTF-8 -%>
<div class="container">
  <div class="content">
    <div class="row">
      <div class="login-form">
        <div style="padding-bottom:15px; margin-left:-20px">
        <img id="logo" src="<%= escape_html @uri_path %>/themes/<%= @theme %>/img/logo.jpg"/>
        </div>
        <% if @message %>
        <div class="alert alert-<%= escape_html @message[:type] %>">
          <button class="close" data-dismiss="alert">×</button>
          <%= escape_html @message[:message] %>
        </div>
        <% end %>
        <form method="post" action="<%= @form_action || "login" %>" id="login-form"
              onsubmit="submitbutton = document.getElementById('login-submit'); submitbutton.value='<%= t.notice.please_wait %>'; submitbutton.disabled=true; return true;">
          <fieldset>
            <div class="clearfix">
              <input type="text" id="username" name="username"  tabindex="1" accesskey="u"  placeholder="<%= t.label.username %>"/>
            </div>
            <div class="clearfix">
              <input type="password" id="password" name="password" size="32" tabindex="2" accesskey="p" autocomplete="off" placeholder="<%= t.label.password %>"/>
            </div>
            <input type="hidden" id="lt" name="lt" value="<%= escape_html @lt %>" />
            <input type="hidden" id="service" name="service" value="<%= escape_html @service %>" />
            <input type="submit" accesskey="l" value="<%= t.button.login %>" tabindex="4" id="login-submit" class="btn btn-primary"/>
            <% if !@password_recovery_url.blank? %>
                <a href="<%= @password_recovery_url %>" class='btn btn-danger'><%= t.button.password_recovery %></a>
            <% end %>
          </fieldset>
        </form>
      </div>
      <div style="text-align:center">
        <%= @infoline %><br/>
        <% r18n.available_locales.each do |locale| %>
            <a href="<%= @uri_path %>/login?locale=<%= locale.code%>"><img src="<%= escape_html @uri_path %>/flags/<%= locale.code %>.png"/></a>
        <% end %>
      </div>
    </div>
  </div>
</div>
<!-- /container -->
